import { AuthModuleOptions } from '@nestjs/passport'
import { MulterModuleOptions } from '@nestjs/platform-express'
import { JwtModuleOptions } from '@nestjs/jwt'
import { TypeOrmModuleOptions } from '@nestjs/typeorm'
import { OpenAPIObject } from '@nestjs/swagger'
import { CasbinModuleOptions } from '@ttou/nest-casbin'
import { WinstonModuleOptions } from '@ttou/nest-winston'

/**
 * 配置
 */
export interface IConfig {
  port?: number

  prefix?: string

  static?: {
    path?: string
  }

  passport?: AuthModuleOptions

  winston?: WinstonModuleOptions

  multer?: MulterModuleOptions

  casbin?: CasbinModuleOptions

  jwt?: JwtModuleOptions

  typeorm?: TypeOrmModuleOptions

  swagger?: {
    path?: string
    statsPath?: string
    config?: Pick<
      OpenAPIObject,
      'openapi' | 'info' | 'servers' | 'security' | 'tags' | 'externalDocs'
    >
  }
}
